import {useEffect} from 'react'
import {Text, View} from '@tarojs/components'
import {useDidShow} from '@tarojs/taro'

import './index.scss'
import {Image} from "@taroify/core";


export interface ImageNaviButtonProps {
  width?: number;
  height?: number;
  src?: string;
  title?: string;
  style?: string;
  onClickEvent?: () => void
}

export default function BtImageNaviButton(props: ImageNaviButtonProps) {

  // 初始化数据
  useEffect(() => {
  }, [])

  // 显示页面时刷新数据
  useDidShow(() => {
  })

  return (
    <View className="image-navi-button-container" style={props.style} onClick={props.onClickEvent}>
      <Image mode='aspectFill' className='image-navi-button-container-image-box' src={props.src}/>
      <View className='image-navi-button-container-mask-box'>
        <Text>{props.title}</Text>
      </View>
    </View>
  )
}
